*Table SI.5. Robustness of Exposure to Violence differences in preferences for deals' components controlling for heterogeneity in components by demographic characteristics listed at the top of each column: Jerusalem and Judea and Samaria district (J+J&S district), age (in years) and gender. Characteristics of the individual do not vary between alternatives and the average additive effect of these characteristics on the valuation of alternative deals cannot be identified, but interactions with components can. The panel at the bottom of the table reports the p-values of Wald test statistics of the null hypothesis that valuations of components do not vary (that is, there is no heterogeneity) by each characteristic (row) across the various specification (column)

* Data in use are 
*use "$rootfolder\Data\Israelis_ranking_data.dta"
*gen EV = (count_people_know>0 & count_people_know

* Measurement of violence exposure: "Do you or any of your relatives, friends or acquaintances have been a victim of an incident of violence related to the conflict with the Palestinians?"


browse participantcode count_* 
* Knows someone
rologit rank a-h if card_ranking_today_cardgam > 240 & repsample==1 & count_people_know>0 & count_people_know<. | card_ranking_today_cardgam > 240 & consent_ipanel_project==1 & count_people_know>0 & count_people_know<., group(player_id) reverse vce(cluster player_id)  /*knows someone, n=199*/
est store Israel_knows_someone
foreach v of varlist a b c d e f g h {
	gen _bHE_knows_`v' = _b[`v']
	if abs(_b[`v']) > 1.645*(_se[`v']) {
		scalar _bHE_knows_`v' = _b[`v']
	}
	else {
		scalar _bHE_knows_`v' = 0
	}
}

* does not know anyone - noone 
rologit rank a-h if card_ranking_today_cardgam > 240 & repsample==1 & count_people_know==0 | card_ranking_today_cardgam > 240 & consent_ipanel_project==1 & count_people_know==0, group(player_id) reverse vce(cluster player_id)  /*no-one, n=462*/
est store Israel_noone
foreach v of varlist a b c d e f g h {
	gen _bHE_noone_`v' = _b[`v']
	if abs(_b[`v']) > 1.645*(_se[`v']) {
		scalar _bHE_noone_`v' = _b[`v']
	}
	else {
		scalar _bHE_noone_`v' = 0
	}
}


* Knows someone who died
rologit rank a-h if card_ranking_today_cardgam > 240 & repsample==1 & count_people_know>0 & count_people_know<. & count_died>0 & count_died<.| card_ranking_today_cardgam > 240 & consent_ipanel_project==1 &  count_people_know>0 & count_people_know<. & count_died>0 & count_died<., group(player_id) reverse vce(cluster player_id)  /*n=85, much more opposed to freedom of movemenet and independent Palestinian state*/
est store Israel_died
foreach v of varlist a b c d e f g h {
	 gen _bHE_died_`v' = _b[`v']
	if abs(_b[`v']) > 1.645*(_se[`v']) {
		scalar _bHE_died_`v' = _b[`v']
	}
	else {
		scalar _bHE_died_`v' = 0
	}
}

tab consent_district, gen(district)

* Merging the district 1 (Jerusalem) with 7 (Samaria/Inside West Bank)
gen district17 = district1
replace district17 = 1 if district7==1

foreach var of varlist EV {
	
    display "TESTING THE ROBUSTNESS OF THE HETEROGENEITY IN PARAMETRS OF VIOLENCE EXPOSURE "
	rologit rank a-h c.`var'#c.(a b c d e f g h) if card_ranking_today_cardgam > 240 & repsample==1 | card_ranking_today_cardgam > 240 & consent_ipanel_project==1 , group(player_id) reverse vce(cluster player_id)  /*knows someone, n=199*/
	est store m1 
	testparm c.`var'#c.(a b c d e f g h) 

	rologit rank a-h c.`var'#c.(a b c d e f g h) c.district17#c.(a b c d e f g h) if card_ranking_today_cardgam > 240 & repsample==1 | card_ranking_today_cardgam > 240 & consent_ipanel_project==1 , group(player_id) reverse vce(cluster player_id)  /*knows someone, n=199*/
	est store m2
	testparm c.`var'#c.(a b c d e f g h) 
	testparm c.district17#c.(a b c d e f g h) 

	rologit rank a-h c.`var'#c.(a b c d e f g h) c.district17#c.(a b c d e f g h) c.demographics_age#c.(a b c d e f g h)  if card_ranking_today_cardgam > 240 & repsample==1 | card_ranking_today_cardgam > 240 & consent_ipanel_project==1 , group(player_id) reverse vce(cluster player_id)  /*knows someone, n=199*/
	est store m3
	testparm c.`var'#c.(a b c d e f g h) 
	testparm c.district17#c.(a b c d e f g h) 
	testparm c.demographics_age#c.(a b c d e f g h) 

	rologit rank a-h c.`var'#c.(a b c d e f g h) c.district17#c.(a b c d e f g h) c.demographics_age#c.(a b c d e f g h)  c.demographics_gender#c.(a b c d e f g h) if card_ranking_today_cardgam > 240 & repsample==1 | card_ranking_today_cardgam > 240 & consent_ipanel_project==1 , group(player_id) reverse vce(cluster player_id)  /*knows someone, n=199*/
	est store m4

	testparm c.`var'#c.(a b c d e f g h) 
	testparm c.district17#c.(a b c d e f g h) 
	testparm c.demographics_age#c.(a b c d e f g h) 
	testparm c.demographics_gender#c.(a b c d e f g h) 

	rologit rank a-h c.EV#c.(a b c d e f g h)  c.demographics_age#c.(a b c d e f g h)  c.demographics_gender#c.(a b c d e f g h) if card_ranking_today_cardgam > 240 & repsample==1 | card_ranking_today_cardgam > 240 & consent_ipanel_project==1 , group(player_id) reverse vce(cluster player_id)  /*knows someone, n=199*/
	est store m5
	testparm c.EV#c.(a b c d e f g h) 
	testparm c.demographics_age#c.(a b c d e f g h) 
	testparm c.demographics_gender#c.(a b c d e f g h) 

}

*Table SI.5. Robustness of Exposure to Violence differences in preferences for deals' components controlling for heterogeneity in components by demographic characteristics 

estout  m1 m2 m3 m4 m5,  replace   title("TITLE") ///
prehead(\begin{table}[htbp]\centering ///
\caption{{\sc @title}} ///
\begin{tabular}{l*{@M}{r}} ) ///
posthead("\hline\hline") prefoot("\hline") ///
stats(r2 r2_a N, fmt(%6.0f %8.3f %8.1f ) labels("$R^2$" "adj.$R^2$" "obs")) ///
varlabels( _cons "constant"  ) legend ///
cells(b(star fmt(%8.4f) ) se(par fmt(%6.3f))) ///
postfoot(\hline\hline\end{tabular} ///
\begin{minipage}{0.75\textwidth}\scriptsize{Notes: Bootstrapped standard errors in parenthesis (100 replications)}\end{minipage}\hfill\end{table}) ///
starlevels(* 0.1 ** 0.05 *** 0.01) 
*notype

